<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />

<link href="${ctx}/assets/sea-modules/jscal2/jscal2/1.9/css/jscal2.css?v=${version}" rel="stylesheet" />
<a name="top"></a>
<!--活动说明-->
<div class="container">
	<div id="start-content">
		<div class="start-content" id="tabs-858155">
			<div class="tab-content start_tab_content">
				<div id="loading-load" style="display: none; text-align: center; color: #834313;"></div>
				<div class="tab-pane active clearfix" id="panel-308006"	style="position: relative;">
					<div class="start_pro_left" style="width:100%;">
						<div id="error"	style="position: fixed; top: 50%; left: 45%; z-index: 10000; text-align: center; width: 120px; padding: 0px;"></div>
						<h4 class="tab-cont-title">发起优惠活动</h4>
						<form id="startProjectForm">
							<input type="hidden" value="${project.id }" name="id" id="startPid"> 
							<input id="status" name="status" value="0" type="hidden"> 							
							<input name="user.id" value="" id="user_id" type="hidden">
							<table class="table">
								<tr>
									<td><b>活动名称</b></td>
									<td><input type="text" name="name" id="name" placeholder="请控制在30个字符以内" 
											class="activity-name form-control required"	value="${project.name}" />
									</td>
								</tr>
								<tr>
									<td><b>选择类别</b></td>
									<td><input type="hidden" name="projectCategory.id" id="openCategory"></td>
								</tr>
								<tr>
									<td colspan="2" class="open-checkbox">
										<div class="open-group row-fluid" id="open-select"	style="width: auto;">
											<div class="laoding-round"></div>
										</div>
									</td>
								</tr>
								<tr>
									<td><b>简要说明</b></td>
									<td><textarea rows="" cols=""
										placeholder="对活动进行简要描述，不要超过200个字符" id="description"
										name="description" class="form-control activity-brief">${project.description}</textarea></td>
								</tr>
								<tr>
									<td><b>封面图片</b></td>
									<td class="upload-img">
										<input id="coverId" type="hidden" value="${project.photoId }" name="photoId" />
										<input 	type="file" class="file-input" name="" id="file-input">
										<input type="button" id="cover-upload" value="上传图片" class="upload-front" readonly>
											<div style="position: relative; margin-left: 95px;">
												<div id="progress" class="coverId-name">
													<div class="bar" style="width: 0%; position: absolute;"></div>
													图片最佳尺寸为340*200像素，或控制在同等比例，不超过1mb！
												</div>
											</div>
											<div id="coverId-preview" style="margin: 10px 0;"></div>
									</td>
								</tr>
								<tr>
									<td><!-- <span style="color: #e00">*</span> --><b>活动详情</b></td>
									<td class="activity-back">
										<textarea name="activityBackground" class="form-control required" id="activityBackground">${project.activityBackground }</textarea>
										<span class="btn btn-success fileinput-button" 	style="display: none;"> 
											<i class="glyphicon glyphicon-plus"></i> 
											<span>添加图片</span> <!-- 单选 -->
											<input id="fileupload" type="file" name="files[]">
										</span>
									</td>
								</tr>
								<tr>
									<td><input type="button" class="raise-submit" value="发起" id="startProjectSubmit" />
										<input type="button" class="raise-submit" value="修改" id="editProjectSubmit" style="display:none;"/>
										</td>
								</tr>
							</table>
						</form>
					</div>
					<div class="span3" id="projectJj" style="position: absolute; right: 0px; top: 0px;"></div>
				</div>
			</div>
		</div>
		<div id="modal-container-36737777" class="modal hide fade"	role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
					确认删除
		</div>
		<div class="modal-body">
			<p>您真的要删除吗?</p>
		</div>
		<div class="modal-footer">
			<button class="doQr" data-dismiss="modal" aria-hidden="true">确认</button>
			<button class="qx" data-dismiss="modal" aria-hidden="true">取消</button>
		</div>
	</div>
</div>
	<a href="#top" class="back_top"></a>
</div>
<div class="letter_send_seccuss" style="display:none">
	<span class="show_success"></span>提交成功
</div>
<script type="text/html" id="open-select-template">
	<$for(var i= 0;i<data.length;i++){$>
	   <span id="checkf<$=i$>" class="open-item" value="<$=data[i].id$>"><$=data[i].categoryName$></span>
	<$}$>									
</script>
<c:if test="${env == 'production' }">
	<script type="text/javascript">
		seajs.use("${ctx}/assets/js-dist/admin/preferential");
	</script>
</c:if>
<c:if test="${env != 'production' }">
	<script type="text/javascript">
		seajs.use("${ctx}/assets/js/admin/preferential");
	</script>
</c:if>


